<?php

/**
 * @Author: zhibinm (113664000@qq.com)
 * @Date:   2018-04-18 16:55:55 
 * @Copyright:   xuebingsi
 * @Last Modified by:   Zhibinm
 * @Last Modified time: 2018-04-18 17:25:31
 */
$logo = imageCreateFrompng('./logo1.png');

$w = imagesx($logo);

$y = imagesy($logo);


$bg = imageCreateFromjpeg('./bg.jpg');

$bw = imagesx($bg);

$by = imagesy($bg);


imagecopy ( $bg  , $logo , $bw-$w-20 , $by-$y-20, 0 , 0 , $w , $y );

imagecopymerge($bg  , $logo , $bw-$w-20 , $by-$y-20, 0 , 0 , $w , $y ,30);
// 
imagecopyresized ($bg , $logo , 0 , 0 , 0 , 0 , $w/2 , $y/2 ,$w , $y );




// $w = imagesx($src);

// var_dump($w);


// $y = imagesy($src);

// var_dump($y);

header("Content-type: image/png");
//输出画布
// imagepng($bg,'./file'.uniqid().".png");
imagepng($bg);
